package com.srit.system.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

import com.srit.core.bean.Page;
import com.srit.system.bean.Url;
import com.srit.system.dao.UrlDao;
@Controller
public class UrlController {
	@Autowired(required = true)
	private UrlDao urlDao;
	@RequestMapping("/url-search")
	public String search(@ModelAttribute Page page) {
		urlDao.page(page);
		return "system/url";
	}
	@RequestMapping("/url-form")
	public String form(@ModelAttribute Url url,
			ModelMap modelMap) {
		
		return "system/url";
	}
	@RequestMapping("/url-edit")
	public String edit(@ModelAttribute Url url){
		return "system/url";
	}
}
